<script setup>

import { onMounted,ref } from 'vue';
import * as echarts from 'echarts';   //第一步引入
var main = ref(null)
  // 第二步初始化echarts
  // 基于准备好的dom，初始化echarts实例
  onMounted(()=>{
    draw()
  })
  const draw=()=>{
    var myChart = echarts.init(main.value);
    console.log('myChart',myChart);
  }
</script>

<template>
  <div>
    <div ref="main" style="width: 600px;height:400px;"></div>
  </div>
</template>

<style scoped>

</style>
